Skip to content

Fix Heroku build failure: add NODE_OPTIONS to build script for Node 18 compatibility#424

Merged
CasperL1218 merged 1 commit into
mainfrom
fix-build-openssl
Apr 20, 2026
Merged

Fix Heroku build failure: add NODE_OPTIONS to build script for Node 18 compatibility#424
CasperL1218 merged 1 commit into
mainfrom
fix-build-openssl

Conversation

@CasperL1218
Copy link
Copy Markdown
Contributor

Summary

  • Added NODE_OPTIONS=--openssl-legacy-provider to the build script in frontend/package.json

webpack 4 (bundled with react-scripts 4) uses legacy OpenSSL digest algorithms unsupported in Node 18. The start
script already had this flag, but the build script was missing it, causing ERR_OSSL_EVP_UNSUPPORTED on Heroku.

Test Plan

Heroku staging build succeeded after setting NODE_OPTIONS=--openssl-legacy-provider as a config var (equivalent
workaround). This PR makes the fix permanent in code so the config var is no longer needed.

Notes

The Heroku config var NODE_OPTIONS=--openssl-legacy-provider can be removed after this merges — it will be
redundant. This is a short-term fix; long-term solution is upgrading to react-scripts 5 or Vite (tracked in TODO).

  webpack 4 (bundled with react-scripts 4) uses legacy OpenSSL digest
  algorithms not supported in Node 18. The start script already had this
  flag; the build script was missing it, causing ERR_OSSL_EVP_UNSUPPORTED
  on Heroku.
@dti-github-bot
Copy link
Copy Markdown
Member

[diff-counting] Significant lines: 0.

@CasperL1218 CasperL1218 requested review from Natk21 and laurenp-2 April 19, 2026 17:04
@CasperL1218 CasperL1218 merged commit dfa0881 into main Apr 20, 2026
4 checks passed
@CasperL1218 CasperL1218 deleted the fix-build-openssl branch April 20, 2026 21:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants